package com.crealth.db;

import java.util.List;

import com.crealth.manager.MybatisManager;
import com.crealth.model.SipConfigModel;

public class SipConfigDb {

	public static List<SipConfigModel> selectAllSipConfig() {
		List<SipConfigModel> sipConfigls = MybatisManager.sipConfigMapper.selectAllSipConfig();
		
		return sipConfigls;
	}
    
    public static void insertSipConfig(SipConfigModel sipConfig) {
    	MybatisManager.sipConfigMapper.insertSipConfig(sipConfig);
    	MybatisManager.commit();
    }    
    
    public static Integer updateSipConfigByCompanyID(SipConfigModel sipConfig) {
    	Integer res = MybatisManager.sipConfigMapper.updateSipConfigByCompanyID(sipConfig);
    	MybatisManager.commit();
    	
    	return res;
    }
    
    public static Integer updateSipConfigByCityName(SipConfigModel sipConfig) {
    	Integer res = MybatisManager.sipConfigMapper.updateSipConfigByCityName(sipConfig);
    	MybatisManager.commit();
    	
    	return res;
    }
	
}
